#ifndef KING_H
#define KING_H

#include <QWidget>
#include <QMouseEvent>
#include <QTime>
#include <QMainWindow>
#include<QPushButton>
#include<QDateTime>
#include<QTimer>
#include<QFont>
#include <windows.h>
#include <windowsx.h>

QT_BEGIN_NAMESPACE
namespace Ui {
class King;
}
QT_END_NAMESPACE

class King : public QMainWindow
{
    Q_OBJECT

public:
    King(QWidget *parent = nullptr);//待定
    ~King();
protected:
    void mousePressEvent(QMouseEvent *e); //鼠标单击事件
    void mouseMoveEvent(QMouseEvent *e); // 鼠标单击拖动窗口
private slots:
    void time_out();
    void initTime(); //初始化时间
    void updateTime(); //更新时间
private:
    float Opacity;//透明度控制
    int state; //用于暂停和恢复暂停
    int tomato_num; //番茄钟计数
    QString current_color;
    QPoint clickPos;
    Ui::King *ui;
    QTimer *timer;
    QTime time;
};
#endif // KING_H
